Automatic Inference of Class Invariants

نویسنده

  • Francesco Logozzo
چکیده

We present a generic framework for the automatic and modular inference of sound class invariants for class-based object oriented languages. The idea is to derive a sound class invariant as a conservative abstraction of the class semantics. In particular we show how a class invariant can be characterized as the solution of a set of equations extracted from the program source. Once a static analysis for the method bodies is supplied, a solution for the former equation system can be iteratively computed. Thus, the class invariant can be automatically inferred. Moreover, our framework is modular since it allows the derivation of class invariants without any hypothesis on the instantiation context and, in the case of subclassing, without accessing to the parent code.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Class invariants as abstract interpretation of trace semantics

We present a generic framework for the automatic and modular inference of sound class invariants for class-based object-oriented languages.We define a trace-based semantics for classeswhich considers all possible orderings, with all possible arguments, of invocations of all the methods of a class. We prove a correspondence theorem between such a semantics and a generic, trace-based, semantics f...

متن کامل

Automatic Inference of Reference-Count Invariants

While we know how to eÆciently collect short-lived garbage, collecting long-lived garbage usually requires expensive tracing traversals. This paper suggests a static analysis technique that can identify program points that make objects unreachable, allowing automatic insertion of explicit deallocation functions.

متن کامل

Data-Driven Loop Invariant Inference with Automatic Feature Synthesis

We present LOOPINVGEN, a tool for generating loop invariants that can provably guarantee correctness of a program with respect to a given specification. We extend the data-driven approach to inferring sufficient loop invariants from a collection of program states. In contrast to existing data-driven techniques, LOOPINVGEN is not restricted to a fixed set of features – atomic predicates that are...

متن کامل

Preproceedings of the 22 nd Symposium on Implementation and Application of Functional Languages ( IFL 2010 )

The paper presents preliminary results in automatic inference of size invariants, and of ranking functions proving termination of functional programs, by adapting linear techniques developed for other languages. The results are promising and allow to solve some problems left open in previous works on automatic inference of safe memory bounds.

متن کامل

Using widenings to infer loop invariants inside an SMT solver, or: A theorem prover as abstract domain

This paper presents a new technique for combining the inference power of abstract interpretation with the precision and flexibility of an automatic satisfiabilitymodulo-theories theorem prover.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004